<?php

class Default_FormController extends Common_Controller_Front {

    /**
     *
     * @var Zend_Session_Namespace
     */
    private $session = null;

    public function init() {
        parent::init();

        $this->session = $this->view->session = new Zend_Session_Namespace('index', true);
    }

    public function indexAction() {
        $this->view->displayContentOff = 1;
        $this->view->displayLeftBoxOff = 1;

        $this->addCssFile('map.css');
        $this->addJsFile('setupmap.js');
        $this->addJsFile('jquery.ui.map.full.min.js');
        $this->addJs('', array('src' => 'http://maps.google.com/maps/api/js?sensor=true'));
        $this->addJs("var gmaps_pos = {
                lat:'51.946480289278114',
                lng:'15.523243606605547'
            };
            var gmaps_head = {
                t:'Konserwator',
                d: 'Aleja Wojska Polskiego 63<br\/>'+\r\n'Zielona G\u00f3ra, Poland<br\/>'};
            ");
        $form = $this->getParam('form');
        
        
        $tresc = $this->contentModel->getContent('rewrite like \''.($form=="zapytanie"?'form-zap':'form-kontakt').'\'');
        $this->view->tresc = $tresc[0];
        
        $this->render($form);
        
    }

}

